package demo;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2024-03-27  19:35
 */
public class IODemo11 {
    public static void main(String[] args) throws IOException {
        try(Writer writer = new FileWriter("./text.txt")) {
            String str = new String("hello");
            writer.write(str);
        }
    }
}
